using System;
using AvaloniaApplication1.ViewModels;

namespace AvaloniaApplication1.Factory;

/// <summary>
/// 视图模型工厂基类 (拓展一些ViewModel的通用方法或者逻辑)
/// </summary>
/// <typeparam name="TModel"></typeparam>
/// <typeparam name="TViewModel"></typeparam>
public abstract class ViewModelFactoryBase<TModel,TViewModel>:IViewModelFactory<TModel,TViewModel> where TViewModel:class
{
    private readonly IServiceProvider ServiceProvider;

    public abstract TViewModel Create(TModel model);
    public ViewModelFactoryBase(IServiceProvider serviceProvider)
    {
        ServiceProvider = serviceProvider;
    }
}